package fichier;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.*;

import java.io.File;
import java.sql.*;


public class AfficherModele extends JFrame implements ActionListener, MouseListener
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 2546027855591398278L;
	/**
	 * 
	 */
	private JPanel pane;
	private JLabel designation;
	private JLabel client;
	private JLabel box;
	private JLabel annee;
	private JLabel numero;
	private JLabel numeroPlan;
	private JLabel commentaire;
	private JLabel nbMoules;
	private JLabel nbBoites;
	//private JLabel image;
	private JLabel clientBox ;
	private JLabel boxBox ;
	private JLabel anneeTxt;
	private JLabel designationTxt;
	private JLabel numeroTxt;
	private JLabel numeroPlanTxt;
	private JLabel commentaireTxt;
	private JLabel nbMoulesTxt;
	private JLabel nbBoitesTxt ;
	private JButton modifBut ;
	private JButton supprBut ;
	private JButton ajoutEntree ;
	private JButton ajoutSortie ;
	private JButton genererPdf ;
	private JButton genererPlan ;
	private JMenuBar menuBar;
	private JMenu mModele;
	private JMenu mClient;
	private JMenu fichier;
	private JMenuItem deconnexion;
	private JMenuItem miRechercherM;
	private JMenuItem miAjouterM;
	private JMenuItem miAjouterC;
	private JMenuItem miModifierPwd;
	private JMenuItem miAjoutBox;
	public String[] clientboxtab;
	public String[] boxboxtab;
	private File imageFile;
	public static final String pathImage = "/Users/yannlarriau/Documents/workspace/Model Manager/Images/";
	public int iD;
	private int ligneVisuEntree;
	private int ligneVisuSortie;
	private JTable tableauEntree;
	private UneditableTableModel tabEntree;
	private JTable tableauSortie;
	private UneditableTableModel tabSortie;
	private JScrollPane scrollpaneEntree;
	private JScrollPane scrollpaneSortie;
	private static String [] [] donneesEntree;
	private static String [] [] donneesSortie;

	public AfficherModele(int iD)
	{
		super("Gestion des modèles - AFP Entreprises");
		this.iD=iD;
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		this.setBounds(100,100,560,550 );
		this.setImageFile(new File(pathImage + "imagenonexistante.jpg"));


		SelectData.REQUETE = "select designation_modele, " +
				"nom_client, " +
				"numero_modele, " +
				"numero_plan_modele, " +
				"annee_modele, " +
				"nom_box, " +
				"commentaire_modele, " +
				"nombre_moule_modele, " +
				"nombre_boite_modele " +
				"from modele m " +
				"join client c on m.id_client = c.id_client " +
				"join box b on m.id_box = b.id_box " +
				"where m.id_modele = " + this.iD;
		ResultSet infoModele = SelectData.startSelect();



		this.tableauEntree = new JTable();
		this.tableauSortie = new JTable();
		this.menuBar = new JMenuBar();
		this.mModele = new JMenu("Modèle");
		this.mClient = new JMenu("Client");
		this.fichier = new JMenu("Fichier");
		this.deconnexion = new JMenuItem("Quitter");
		this.miRechercherM = new JMenuItem("Rechercher");
		this.miAjouterM = new JMenuItem("Ajouter");
		new JMenuItem("Modifier");
		this.miAjouterC = new JMenuItem("Ajouter");
		this.miModifierPwd = new JMenuItem("Modifier mot de passe");
		this.miAjoutBox = new JMenuItem("Ajouter un nouveau Box");

		//this.menuBar.add(this.fichier);
		//this.menuBar.add(this.mModele);
		//this.menuBar.add(this.mClient);
		//this.fichier.add(this.miAjoutBox);
		//this.fichier.add(this.miModifierPwd);
		//this.fichier.add(this.deconnexion);
		//this.mModele.add(this.miRechercherM);
		//this.mModele.add(this.miAjouterM);
		//this.mClient.add(this.miAjouterC);
		
		this.menuBar.add(this.fichier);
		this.menuBar.add(this.mModele);
		if(Connexion.autorisation==1)
		{
		this.menuBar.add(this.mClient);
		this.mClient.add(this.miAjouterC);
		this.mModele.add(this.miAjouterM);
		}
		this.fichier.add(this.miAjoutBox);
		this.fichier.add(this.miModifierPwd);
		this.fichier.add(this.deconnexion);
		this.mModele.add(this.miRechercherM);
		
		this.setJMenuBar(this.menuBar);

		this.pane = new JPanel();
		this.designation = new JLabel("Designation :");
		this.client = new JLabel("Client :");
		this.box = new JLabel("N° Box :");
		this.annee = new JLabel("Date :");
		this.numero = new JLabel("Numéro :");
		this.numeroPlan = new JLabel("N° Plan :");
		this.commentaire = new JLabel("Commentaire :");
		this.nbMoules = new JLabel("Nombre de Modèles :");
		this.nbBoites = new JLabel("Nombre de Boites :");
		//this.image = new JLabel("Image");
		Font newLabelFont=new Font(this.designation.getFont().getName(),Font.BOLD,this.designation.getFont().getSize());

		this.designation.setFont(newLabelFont);  
		this.client.setFont(newLabelFont);  
		this.box.setFont(newLabelFont);  
		this.annee.setFont(newLabelFont);  
		this.numero.setFont(newLabelFont);  
		this.numeroPlan.setFont(newLabelFont);  
		this.commentaire.setFont(newLabelFont);  
		this.nbMoules.setFont(newLabelFont);  
		this.nbBoites.setFont(newLabelFont);  

		try {
			if(infoModele.next())
			{
				this.clientBox = new JLabel(infoModele.getString("nom_client"));
				this.boxBox = new JLabel(infoModele.getString("nom_box"));
				this.anneeTxt = new JLabel(infoModele.getString("annee_modele"));
				this.designationTxt = new JLabel(infoModele.getString("designation_modele"));
				this.numeroTxt = new JLabel(infoModele.getString("numero_modele"));
				this.numeroPlanTxt = new JLabel(infoModele.getString("numero_plan_modele"));
				this.commentaireTxt = new JLabel(infoModele.getString("commentaire_modele"));
				this.nbMoulesTxt = new JLabel(infoModele.getString("nombre_moule_modele"));
				this.nbBoitesTxt = new JLabel(infoModele.getString("nombre_boite_modele"));
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		this.modifBut = new JButton("Modifier");
		this.supprBut = new JButton("Supprimer");
		this.ajoutEntree = new JButton("Ajouter Entrée");
		this.ajoutSortie = new JButton("Ajouter Sortie");
		this.genererPdf = new JButton("Générer PDF");
		this.genererPlan = new JButton("Plan Entrepôt");
		this.pane.setBorder(BorderFactory.createTitledBorder("Fiche modèle"));


		this.getContentPane().add(this.pane);
		this.pane.add(designation);
		this.pane.add(client);
		this.pane.add(box);
		this.pane.add(annee);
		this.pane.add(numero);
		this.pane.add(numeroPlan);
		this.pane.add(commentaire);
		this.pane.add(nbMoules);
		this.pane.add(nbBoites);
		//this.pane.add(image);
		this.pane.add(designationTxt);
		this.pane.add(clientBox);
		this.pane.add(boxBox);
		this.pane.add(anneeTxt);
		this.pane.add(numeroTxt);
		this.pane.add(numeroPlanTxt);
		this.pane.add(commentaireTxt);
		this.pane.add(nbMoulesTxt);
		this.pane.add(nbBoitesTxt);
		this.pane.add(ajoutEntree);
		this.pane.add(ajoutSortie);
		this.pane.add(genererPdf);
		this.pane.add(genererPlan);

		this.getContentPane().setLayout(null);
		this.pane.setLayout(null);

		this.pane.setBounds(5,5,540,485);
		this.designation.setBounds(30,20,120,20);
		this.client.setBounds(330,20,120,20);
		this.box.setBounds(330,100,120,20);
		this.annee.setBounds(30,100,120,20);
		this.numero.setBounds(30,60,120,20);
		this.numeroPlan.setBounds(330,60,120,20);
		this.commentaire.setBounds(30,140,120,20);
		this.nbMoules.setBounds(30,180,143,20);
		this.nbBoites.setBounds(290,180,130,20);
		//this.image.setBounds(30,260,120,20);
		this.designationTxt.setBounds(150,20,120,20);
		this.numeroTxt.setBounds(150,60,120,20);
		this.numeroPlanTxt.setBounds(410,60,120,20);
		this.boxBox.setBounds(410,100,120,20);
		this.anneeTxt.setBounds(150,100,120,20);
		this.clientBox.setBounds(410,20,120,20);
		this.commentaireTxt.setBounds(150,140,380,20);
		this.nbMoulesTxt.setBounds(175,180,110,20);
		this.nbBoitesTxt.setBounds(420,180,120,20);
		this.genererPdf.setBounds(150,240,110,20);
		this.genererPlan.setBounds(30,240,110,20);
		this.ajoutEntree.setBounds(140,450,125,20);
		this.ajoutSortie.setBounds(280,450,125,20);

		if(Connexion.autorisation == 1){
			this.pane.add(modifBut);
			this.pane.add(supprBut);
			this.modifBut.setBounds(280,240,110,20);
			this.supprBut.setBounds(400,240,110,20);
		}
		
		if(Connexion.autorisation == 2){
			this.pane.add(modifBut);
			this.modifBut.setBounds(280,240,110,20);
		}
		
		this.miAjoutBox.addActionListener(this);
		this.miModifierPwd.addActionListener(this);
		this.deconnexion.addActionListener(this);
		this.modifBut.addActionListener(this);
		this.supprBut.addActionListener(this);
		this.ajoutEntree.addActionListener(this);
		this.ajoutSortie.addActionListener(this);
		this.genererPdf.addActionListener(this);
		this.genererPlan.addActionListener(this);
		this.miAjouterC.addActionListener(this);
		this.miRechercherM.addActionListener(this);
		this.miAjouterM.addActionListener(this);
		
		this.scrollpaneEntree = new JScrollPane();
		getContentPane().add(this.scrollpaneEntree) ;
		this.pane.add(this.scrollpaneEntree);
		this.scrollpaneEntree.setBounds(30,280,230,150);
		
		this.scrollpaneSortie = new JScrollPane();
		getContentPane().add(this.scrollpaneSortie) ;
		this.pane.add(this.scrollpaneSortie);
		this.scrollpaneSortie.setBounds(300,280,230,150);
		
		//
		//
		//
		// TABLEAU DES ENTREES
		//
		//
		//
		
		SelectData.REQUETE = "SELECT * FROM ARRIVE WHERE ID_MODELE = "+this.iD+" ORDER BY STR_TO_DATE(DATE_MODELE,'%d-%m-%Y')";
		try{

			ResultSet result = SelectData.startSelect();
			@SuppressWarnings("unused")
			ResultSetMetaData resultMeta = result.getMetaData();
			int nbLignes = 0;

			try{
				while(result.next()){
					nbLignes ++;
				}
			}catch(SQLException h){
				System.out.println(h); 
			}
			String [] titreColonnes = { "Date","Provenance"};
			setDonneesEntree(new  String[nbLignes][5]);
			int i=0;
			SelectData.REQUETE = "SELECT * FROM ARRIVE WHERE ID_MODELE = "+this.iD+" ORDER BY STR_TO_DATE(DATE_MODELE,'%d-%m-%Y')";
			ResultSet result2 = SelectData.startSelect();
				try{
					while(result2.next()){
						getDonneesEntree() [i][0] = result2.getString("date_modele");
						getDonneesEntree() [i][1] = result2.getString("provenance");
						i++;
					}

				}catch(SQLException ex){
					System.out.println(""); 
				}
				this.tabEntree = new UneditableTableModel(getDonneesEntree(),titreColonnes); //Cr�ation d'un model de tableau non �ditable avec les donn�es dedans.
				tableauEntree = new JTable();
				tableauEntree.addMouseListener(this);
				tableauEntree.setModel(this.tabEntree); // Ajout du mod�le non �ditable � la JTable
				this.scrollpaneEntree.setVisible(false);
				this.scrollpaneEntree = new JScrollPane(tableauEntree);
				getContentPane().add(this.scrollpaneEntree) ;
				this.pane.add(this.scrollpaneEntree);
				this.scrollpaneEntree.setBounds(30,280,230,150);
		}catch (Exception e1) {
			e1.printStackTrace();
		}
		
		//
		//
		//
		// TABLEAU DES SORTIES
		//
		//
		//
		
		SelectData.REQUETE = "SELECT * FROM PART WHERE ID_MODELE = "+this.iD+" ORDER BY STR_TO_DATE(DATE_MODELE,'%d-%m-%Y')";
		try{

			ResultSet result = SelectData.startSelect();
			@SuppressWarnings("unused")
			ResultSetMetaData resultMeta = result.getMetaData();
			int nbLignes = 0;

			try{
				while(result.next()){
					nbLignes ++;
				}
			}catch(SQLException h){
				System.out.println(h); 
			}
			String [] titreColonnes = { "Date","Destination","Numéro de bon"};
			setDonneesSortie(new  String[nbLignes][5]);
			int i=0;
			SelectData.REQUETE = "SELECT * FROM PART WHERE ID_MODELE = "+this.iD+" ORDER BY STR_TO_DATE(DATE_MODELE,'%d-%m-%Y')";
			ResultSet result2 = SelectData.startSelect();
				try{
					while(result2.next()){
						getDonneesSortie() [i][0] = result2.getString("date_modele");
						getDonneesSortie() [i][1] = result2.getString("destination");
						getDonneesSortie() [i][2] = result2.getString("numero");
						i++;
					}

				}catch(SQLException ex){
					System.out.println(""); 
				}
				this.tabSortie = new UneditableTableModel(getDonneesSortie(),titreColonnes); //Cr�ation d'un model de tableau non �ditable avec les donn�es dedans.
				tableauSortie = new JTable();
				tableauSortie.addMouseListener(this);
				tableauSortie.setModel(this.tabSortie); // Ajout du mod�le non �ditable � la JTable
				this.scrollpaneSortie.setVisible(false);
				this.scrollpaneSortie = new JScrollPane(tableauSortie);
				getContentPane().add(this.scrollpaneSortie) ;
				this.pane.add(this.scrollpaneSortie);
				this.scrollpaneSortie.setBounds(280,280,230,150);
		}catch (Exception e1) {
			e1.printStackTrace();
		}


		this.setResizable(false);
		this.setVisible(true);
	}



	@SuppressWarnings("unused")
	public void actionPerformed(ActionEvent e)
	{
		if(e.getSource() == this.modifBut){
			this.dispose();
			if(Connexion.autorisation==1){
				ModifierModele modifMod = new ModifierModele(this.iD);
			}
			else{
				ModifierModele2 modifMod = new ModifierModele2(this.iD);
			}
		}
		if(e.getSource()==supprBut)
		{
			int q = JOptionPane.showConfirmDialog(this, "Etes vous sur de vouloir supprimer ce modèle ?", "Attention",JOptionPane.YES_NO_OPTION);
			if(q==0){
				Modele.supprimer(this.iD);
				if(!main.testUpdate)
					JOptionPane.showMessageDialog(this,"Le modèle n'a pas pu être supprime!", "Attention", 1,new ImageIcon(getClass().getResource("/icon/warn.png")));
				else{
					JOptionPane.showMessageDialog(this,"Le modèle a bien été supprimé", "Model Manager", 1,new ImageIcon(getClass().getResource("/icon/ok.png")));
					this.dispose();
					RechercheModele rechMod = new RechercheModele();
				}
			}
		}
		
		if(e.getSource() == this.ajoutEntree){
			this.dispose();
			IHMEntree entree = new IHMEntree(new Modele(this.getID()));
		}
		
		if(e.getSource() == this.ajoutSortie){
			this.dispose();
			IHMSortie sortie = new IHMSortie(new Modele(this.getID()));
		}
		
		if(e.getSource() == this.miRechercherM){
			this.dispose();

			RechercheModele m = new RechercheModele();
		}
		if(e.getSource() == this.miAjouterM){
			this.dispose();

			AjouterModele maFenetre = new AjouterModele();
		}
		if(e.getSource() == this.miAjouterC){
			this.dispose();

			AjouterClient maFenetre = new AjouterClient();
		}
		if(e.getSource() == this.genererPdf){

			Modele m = new Modele(this.iD);

			PDF p = new PDF(m);
		}
		if(e.getSource() == this.genererPlan){

			PlanFenetre p = new PlanFenetre(this.boxBox.getText());
		}
		if(e.getSource() == this.miModifierPwd){
			ChangeMdP password = new ChangeMdP(this,true);
		}
		if(e.getSource() == this.miAjoutBox){
			AjoutBox box = new AjoutBox(this, true);
		}
		if(e.getSource() == this.deconnexion){
			System.exit(0);	
		}
	}
	
	public void mouseClicked (MouseEvent e)
	{

		if(e.getSource() == this.tableauEntree){
			this.ligneVisuEntree = tableauEntree.getSelectedRow();
			tableauEntree.setRowSelectionAllowed(true);
			//this.visBut.setEnabled(true);
		}
		if(e.getSource() == this.tableauSortie){
			this.ligneVisuSortie = tableauSortie.getSelectedRow();
			tableauSortie.setRowSelectionAllowed(true);
			//this.visBut.setEnabled(true);
		}

	}



	@Override
	public void mouseEntered(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
	}



	@Override
	public void mouseExited(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
	}



	@Override
	public void mousePressed(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
	}



	@Override
	public void mouseReleased(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
	}



	public static long getSerialversionuid() {
		return serialVersionUID;
	}



	public JPanel getPane() {
		return pane;
	}



	public JLabel getDesignation() {
		return designation;
	}



	public JLabel getClient() {
		return client;
	}



	public JLabel getBox() {
		return box;
	}



	public JLabel getAnnee() {
		return annee;
	}



	public JLabel getNumero() {
		return numero;
	}



	public JLabel getNumeroPlan() {
		return numeroPlan;
	}



	public JLabel getCommentaire() {
		return commentaire;
	}



	public JLabel getNbMoules() {
		return nbMoules;
	}



	public JLabel getNbBoites() {
		return nbBoites;
	}



	public JLabel getClientBox() {
		return clientBox;
	}



	public JLabel getBoxBox() {
		return boxBox;
	}



	public JLabel getAnneeTxt() {
		return anneeTxt;
	}



	public JLabel getDesignationTxt() {
		return designationTxt;
	}



	public JLabel getNumeroTxt() {
		return numeroTxt;
	}



	public JLabel getNumeroPlanTxt() {
		return numeroPlanTxt;
	}



	public JLabel getCommentaireTxt() {
		return commentaireTxt;
	}



	public JLabel getNbMoulesTxt() {
		return nbMoulesTxt;
	}



	public JLabel getNbBoitesTxt() {
		return nbBoitesTxt;
	}



	public JButton getModifBut() {
		return modifBut;
	}



	public JButton getSupprBut() {
		return supprBut;
	}



	public JButton getAjoutEntree() {
		return ajoutEntree;
	}



	public JButton getAjoutSortie() {
		return ajoutSortie;
	}



	public JButton getGenererPdf() {
		return genererPdf;
	}



	public JButton getGenererPlan() {
		return genererPlan;
	}



	public JMenu getmModele() {
		return mModele;
	}



	public JMenu getmClient() {
		return mClient;
	}



	public JMenu getFichier() {
		return fichier;
	}



	public JMenuItem getDeconnexion() {
		return deconnexion;
	}



	public JMenuItem getMiRechercherM() {
		return miRechercherM;
	}



	public JMenuItem getMiAjouterM() {
		return miAjouterM;
	}



	public JMenuItem getMiAjouterC() {
		return miAjouterC;
	}



	public String[] getClientboxtab() {
		return clientboxtab;
	}



	public String[] getBoxboxtab() {
		return boxboxtab;
	}



	public File getImageFile() {
		return imageFile;
	}



	public static String getPathimage() {
		return pathImage;
	}



	public int getID() {
		return iD;
	}



	public int getLigneVisuEntree() {
		return ligneVisuEntree;
	}



	public int getLigneVisuSortie() {
		return ligneVisuSortie;
	}



	public JTable getTableauEntree() {
		return tableauEntree;
	}



	public UneditableTableModel getTabEntree() {
		return tabEntree;
	}



	public JTable getTableauSortie() {
		return tableauSortie;
	}



	public UneditableTableModel getTabSortie() {
		return tabSortie;
	}



	public JScrollPane getScrollpaneEntree() {
		return scrollpaneEntree;
	}



	public JScrollPane getScrollpaneSortie() {
		return scrollpaneSortie;
	}



	public static String[][] getDonneesEntree() {
		return donneesEntree;
	}



	public static String[][] getDonneesSortie() {
		return donneesSortie;
	}



	public void setPane(JPanel pane) {
		this.pane = pane;
	}



	public void setDesignation(JLabel designation) {
		this.designation = designation;
	}



	public void setClient(JLabel client) {
		this.client = client;
	}



	public void setBox(JLabel box) {
		this.box = box;
	}



	public void setAnnee(JLabel annee) {
		this.annee = annee;
	}



	public void setNumero(JLabel numero) {
		this.numero = numero;
	}



	public void setNumeroPlan(JLabel numeroPlan) {
		this.numeroPlan = numeroPlan;
	}



	public void setCommentaire(JLabel commentaire) {
		this.commentaire = commentaire;
	}



	public void setNbMoules(JLabel nbMoules) {
		this.nbMoules = nbMoules;
	}



	public void setNbBoites(JLabel nbBoites) {
		this.nbBoites = nbBoites;
	}



	public void setClientBox(JLabel clientBox) {
		this.clientBox = clientBox;
	}



	public void setBoxBox(JLabel boxBox) {
		this.boxBox = boxBox;
	}



	public void setAnneeTxt(JLabel anneeTxt) {
		this.anneeTxt = anneeTxt;
	}



	public void setDesignationTxt(JLabel designationTxt) {
		this.designationTxt = designationTxt;
	}



	public void setNumeroTxt(JLabel numeroTxt) {
		this.numeroTxt = numeroTxt;
	}



	public void setNumeroPlanTxt(JLabel numeroPlanTxt) {
		this.numeroPlanTxt = numeroPlanTxt;
	}



	public void setCommentaireTxt(JLabel commentaireTxt) {
		this.commentaireTxt = commentaireTxt;
	}



	public void setNbMoulesTxt(JLabel nbMoulesTxt) {
		this.nbMoulesTxt = nbMoulesTxt;
	}



	public void setNbBoitesTxt(JLabel nbBoitesTxt) {
		this.nbBoitesTxt = nbBoitesTxt;
	}



	public void setModifBut(JButton modifBut) {
		this.modifBut = modifBut;
	}



	public void setSupprBut(JButton supprBut) {
		this.supprBut = supprBut;
	}



	public void setAjoutEntree(JButton ajoutEntree) {
		this.ajoutEntree = ajoutEntree;
	}



	public void setAjoutSortie(JButton ajoutSortie) {
		this.ajoutSortie = ajoutSortie;
	}



	public void setGenererPdf(JButton genererPdf) {
		this.genererPdf = genererPdf;
	}



	public void setGenererPlan(JButton genererPlan) {
		this.genererPlan = genererPlan;
	}



	public void setmModele(JMenu mModele) {
		this.mModele = mModele;
	}



	public void setmClient(JMenu mClient) {
		this.mClient = mClient;
	}



	public void setFichier(JMenu fichier) {
		this.fichier = fichier;
	}



	public void setDeconnexion(JMenuItem deconnexion) {
		this.deconnexion = deconnexion;
	}



	public void setMiRechercherM(JMenuItem miRechercherM) {
		this.miRechercherM = miRechercherM;
	}



	public void setMiAjouterM(JMenuItem miAjouterM) {
		this.miAjouterM = miAjouterM;
	}



	public void setMiAjouterC(JMenuItem miAjouterC) {
		this.miAjouterC = miAjouterC;
	}



	public void setClientboxtab(String[] clientboxtab) {
		this.clientboxtab = clientboxtab;
	}



	public void setBoxboxtab(String[] boxboxtab) {
		this.boxboxtab = boxboxtab;
	}



	public void setImageFile(File imageFile) {
		this.imageFile = imageFile;
	}



	public void setID(int iD) {
		this.iD = iD;
	}



	public void setLigneVisuEntree(int ligneVisuEntree) {
		this.ligneVisuEntree = ligneVisuEntree;
	}



	public void setLigneVisuSortie(int ligneVisuSortie) {
		this.ligneVisuSortie = ligneVisuSortie;
	}



	public void setTableauEntree(JTable tableauEntree) {
		this.tableauEntree = tableauEntree;
	}



	public void setTabEntree(UneditableTableModel tabEntree) {
		this.tabEntree = tabEntree;
	}



	public void setTableauSortie(JTable tableauSortie) {
		this.tableauSortie = tableauSortie;
	}



	public void setTabSortie(UneditableTableModel tabSortie) {
		this.tabSortie = tabSortie;
	}



	public void setScrollpaneEntree(JScrollPane scrollpaneEntree) {
		this.scrollpaneEntree = scrollpaneEntree;
	}



	public void setScrollpaneSortie(JScrollPane scrollpaneSortie) {
		this.scrollpaneSortie = scrollpaneSortie;
	}



	public static void setDonneesEntree(String[][] donneesEntree) {
		AfficherModele.donneesEntree = donneesEntree;
	}



	public static void setDonneesSortie(String[][] donneesSortie) {
		AfficherModele.donneesSortie = donneesSortie;
	}



}